<%@ page import="com.guomao.entity.Person" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: cjrh2
  Date: 2025/5/14
  Time: 20:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%--${pageContext.request}--%>

<%--${pageContext}--%>

<%
    Person p = new Person();
//    p.setName("root");
    p.setName("");

//    String[] h = {"code", "travel"};
    String[] h = {};
    p.setHobbies(h);

    ArrayList<String> list = new ArrayList<>();
//    list.add("java");
//    list.add("js");

    p.setLessons(list);

    HashMap<String, Integer> map = new HashMap<>();
    map.put("java", 100);
    map.put("js", 99);
    map.put("a.b.c", 99);
    p.setLesson_score(map);

    request.setAttribute("p", p);
%>

<%--
${p} <br>

${p.name} <br>

${p.hobbies}<br>
${p.hobbies[0]}<br>
${p.hobbies[1]}<br>

${p.lessons} <br>
${p.lessons[0]} <br>
${p.lessons[1]} <br>


${p.lesson_score} <br>
${p.lesson_score.java}<br>
${p.lesson_score.js}<br>
${p.lesson_score['a.b.c']}<br>
${p.lesson_score['java']}<br>
${p.lesson_score['js']}<br>

${p.lesson_score.js <= 60}<br>
${p.lesson_score.js le 60}<br>--%>

<hr>


<%--${empty p.name}
${empty p.hobbies}
${empty p.lesson_score}
${empty p.lessons}--%>
</body>
</html>
